package com.example.amap.ui.map.ui.style

import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp

/**
 * 公共按钮样式
 *
 * @param size 圆角大小
 */
fun Modifier.buttonModifier(size: Dp = 8.dp) = this.then(
    Modifier
        .shadow(elevation = 4.dp, shape = RoundedCornerShape(size))
        .background(color = Color.White, shape = RoundedCornerShape(size))
        .border(width = 1.dp, color = Color.Gray, shape = RoundedCornerShape(size))
)